public class TextTmp {


        int date;
        int year;
        int month;
        //构造方法：没有返回值，且方法名与类名相同，这种方法叫构造方法
        public void SetDate(int year,int month,int date){//虽然没有返回值，但是不要加void
            year=year;
            month=month;
            date=date;
        }
        public TextTmp(){
            this(2049,12,2);
            System.out.println("时间为："+year+month+date);
        }
        public TextTmp(int year,int month,int date){
            this.year=year;
            this.month=month;
            this.date=date;
            System.out.println("直接调用了构造器");
        }
        public  void show(){
            System.out.println("年："+year+" "+"月："+month+" "+"日："+date);
        }

        public static void main(String[] args) {
            TextTmp text=new TextTmp();



        }
}
